<?php

namespace App\Models;

use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;

class Download extends Model
{
    use HasDateTimeFormatter;

    protected $fillable = ['user_id','material_id'];



    //用户
    public function user(): BelongsTo
    {
        return $this->belongsTo(User::class);
    }


    //资料
    public function material(): BelongsTo
    {
        return $this->belongsTo(Material::class);
    }
}
